import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import HelloWorld from "../components/HelloWorld"
import introduce from "../views/introduce"
import Public from "../views/Professional/public"
import Experts from "../views/IFfriends/experts"
import Certification from "../views/IFfriends/certification"
import Wrapper from "../views/skill/wrapper"
import Intro from "../views/skill/Intro"
import SignUp from "../views/skill/SignUp"
import Course from "../views/skill/course"
import Record from "../views/skill/Record"
import City from "../views/city/City"
Vue.use(VueRouter)
const routes = [
  {
    path: '/',
    redirect: '/index.html',
  },
  {
    path: '/home',
    name: 'Home',
    component: Home
  },
  {
    path: '/index.html',
    name: 'HelloWorld',
    component: HelloWorld
  },
  {
    path: '/introduce',
    name: 'introduce',
    component: introduce
  },
  {
    path: '/public',
    name: 'public',
    component: Public
  },
  {
    path: '/experts',
    name: 'experts',
    component: Experts
  },
  {
    path: '/certification',
    name: 'certification',
    component: Certification
  },
  {
    path: '/city',
    name: 'City',
    component: City
  },

  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  },
  {
    path: '/wrapper',
    name: 'wrapper',
    component: Wrapper,
    children: [
      {
        path: 'Intro',
        name: 'Intro',
        component: Intro,
  
      },
      {
        path: 'SignUp',
        name: 'SignUp',
        component: SignUp,
      },
      {
        path: 'course',
        name: 'course',
        component: Course,
      },
      {
        path: 'Record',
        name: 'Record',
        component: Record,
      },
    ]
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
